package meconsea.life.clan.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import meconsea.life.sys.entity.AbsEntity;

import org.hibernate.annotations.Type;

@Entity
@Table(name="CLAN_VAL_JOIN")
@NamedQueries({
	@NamedQuery(name=ClanValJoin.CVJ_FIND_CLAN,query="SELECT o FROM ClanValJoin o WHERE o.clanId = :clanId and o.isPass = :isPass"),
	@NamedQuery(name=ClanValJoin.CVJ_FIND_USER,query="SELECT o FROM ClanValJoin o WHERE o.userId = :userId and o.isPass = :isPass")
})
public class ClanValJoin extends AbsEntity {
	
	public final static String CVJ_FIND_CLAN = "cvj_find_caln";
	public final static String CVJ_FIND_USER = "cvj_find_user";
	@Column(name="clanid",length=64)
	private String clanId;
	
	@Column(name="userid",length=64)
	private String userId;
	
	@Column(name="valInfo",length=1024)
	private String valInfo;
	
	@Column(name="ispass")
	@Type(type="integer")
	private String isPass;
	
	@Column(name="applyTime")
	@Temporal(TemporalType.TIMESTAMP)
	private Date applyTime = new Date();

	public String getClanId() {
		return clanId;
	}

	public void setClanId(String clanId) {
		this.clanId = clanId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getValInfo() {
		return valInfo;
	}

	public void setValInfo(String valInfo) {
		this.valInfo = valInfo;
	}

	public String getIsPass() {
		return isPass;
	}

	public void setIsPass(String isPass) {
		this.isPass = isPass;
	}

	public Date getApplyTime() {
		return applyTime;
	}

	public void setApplyTime(Date applyTime) {
		this.applyTime = applyTime;
	}
	
}
